import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

enum ErrorPageType { page, component }

class ErrorRiverWidget extends StatelessWidget {
  final String? title;
  final bool? isRefresh;
  final Function? refreshMethod;
  final ErrorPageType? type;

  const ErrorRiverWidget({
    super.key,
    this.title,
    this.isRefresh = true,
    this.type = ErrorPageType.page,
    this.refreshMethod,
  });

  @override
  Widget build(BuildContext context) {
    return Column(
      children: [
        Container(
          margin: EdgeInsets.only(top: 117.h, bottom: 10.h),
          width: 60.w,
          height: 60.w,
          child: Image.asset('assets/images/image_empty.webp'),
        ),
        Text(title ?? "网络异常", style: TextStyle(fontSize: 14.sp, color: const Color(0xFF999999))),
        if (isRefresh == true) Text('我是按钮'),
      ],
    );
  }
}
